import { camera, scene } from './utils/init'
import * as THREE from 'three'

function initBase() {
  const geometry = new THREE.PlaneGeometry(10, 10)
  const meterial = new THREE.MeshStandardMaterial({color: 0xffffff})
  const plane = new THREE.Mesh(geometry, meterial)
  plane.rotation.set(-Math.PI / 2, 0, 0)
  scene.add(plane)
}

// 创建平行光
function createLight () {
  const directionalLight = new THREE.DirectionalLight(0xffffff, 1)
  directionalLight.position.set(3, 3, 3)
  scene.add(directionalLight)
  const helper = new THREE.DirectionalLightHelper(directionalLight, 1)
  scene.add(helper)
}
camera.position.set(5, 5, 5)
initBase()
createLight()
